#include <stdio.h>

#include "Stack.h"

void Print_Stack(Stack S)
{
    Stack Tmp;
    int current_element;
    Tmp = CreateStack();
    while (!IsEmpty(S))
    {
        current_element = Top(S);
        printf("%d<",current_element);
        Pop(S);
        Push(current_element,Tmp);
    }
    printf("]\n");
    while (!IsEmpty(Tmp))
    {
        Push(Top(Tmp),S);
        Pop(Tmp);
    }
}

void TestStack()
{
    Stack S;
    S = CreateStack();
    Print_Stack(S);
    for (int i=0; i<10; i++)
    {
        Push(i,S);
        Print_Stack(S);
    }
}

int main()
{
    TestStack();
    return 0;
}